package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.ConfConnect;
import cn.getech.data.development.entity.DataSyncInfo;
import cn.getech.data.development.model.dto.ApplyUserListDTO;
import cn.getech.data.development.model.dto.DataBaseDTO;
import cn.getech.data.development.model.dto.DataSyncMetaDataReturnDTO;
import cn.getech.data.development.model.dto.DataSyncQueryDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @Author luoxi
 * @create 2020/11/16 14:53
 */
@Mapper
public interface DataSyncInfoMapper extends BaseMapper<DataSyncInfo> {
    List<DataSyncInfo> listPage(@Param("dataSyncQueryDTO") DataSyncQueryDTO dataSyncQueryDTO, @Param("page") IPage page);

    Set<ApplyUserListDTO> getCreateUserList(@Param("tenantId") Integer tenantId);

    IPage<ConfConnect> getDataSourceByType(IPage<ConfConnect> page,@Param("params") Map params);

    IPage<DataSyncMetaDataReturnDTO>selectCollectionTableInfo(IPage<DataSyncMetaDataReturnDTO> page, @Param("dataBaseDTO") DataBaseDTO dataBaseDTO);

    List<DataSyncMetaDataReturnDTO> selectCollectionTableFieldInfo( @Param("ids") List<Integer> ids);

    void updateStatusById(@Param("id") Integer id,@Param("status") Integer status);

}
